/*
 * Created on Jun 7, 2004
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package IndexComponent;

/**
 * Description:<br>
 * the int keyword
 * @abstract
 * @keywords
 * @author Neil
 */
public class IntKeyword implements Keyword
{
	private Integer value;

	public IntKeyword(int value)
	{
		this.value=new Integer(value);
	}
	
	public int getValue()
	{
		return value.intValue();
	}
	
	public boolean equals(Object o)
	{
		IntKeyword key;
		
		if(!(o instanceof IntKeyword)) return false;
		else
		{
			key=(IntKeyword)o;
			if(value.intValue()==key.getValue()) return true;
			else return false;
		}
	}
	
	public int compareTo(Object o)
	{
		IntKeyword key;
		
		key=(IntKeyword)o;
		if(value.intValue()<key.getValue()) return -1;
		else if(value.intValue()==key.getValue()) return 0;
		else return 1;
	}
	
	public String toString()
	{
		return value.toString();
	}
}
